﻿@model  MvcPaging.IPagedList<object>
@{
    RouteValueDictionary routeValueDic = new RouteValueDictionary();
    foreach (var item in ViewData)
    {
        routeValueDic.Add(item.Key, item.Value);
    }
}

@Html.Pager(Model.PageSize, Model.PageNumber, Model.TotalItemCount).Options(o =>
            o.DisplayTemplate("_PaginationTemplate")
            .MaxNrOfPages(Model.PageSize)
            .AlwaysAddFirstPageNumber()
            .RouteValues(routeValueDic)
            .SetPreviousPageText("上一页")
            .SetNextPageText("下一页"))
